﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/Admin.Master" CodeBehind="Edit_AddNews.aspx.cs" Inherits="NEWS.Admin.Edit_AddNews" ValidateRequest="false" %>

<asp:Content ID="content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="dashboard">
        <h2 class="blockhead">
            <asp:Label ID="lblheader" runat="server" Text="Sửa tin"></asp:Label>
        </h2>
		<div class="blockbody formcontrols">
			<div class="sectioncachon">
			    <div class="blockrow">
					<div>
					   <asp:Label ID="message" runat="server" Font-Bold="True" Font-Size="Small" ForeColor="Red"></asp:Label>
					</div>
				</div>
			    <div class="blockrow">
					<div>
					    <asp:Label ID="lbltitle" runat="server" Text="Tiêu đề: "></asp:Label>
					</div>
					<div>
                        <asp:TextBox ID="txttitle" Width="580px" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txttitle" runat="server" ErrorMessage="Tiêu đề không được rỗng"></asp:RequiredFieldValidator>
					</div>
				</div>
				<div class="blockrow">
				    <div>
				        <asp:Label ID="lblhinhdaidien" runat="server" Text="Hình ảnh đại diện: "></asp:Label>
				        <asp:FileUpload ID="FileUpload_Image" runat="server" />
				        <asp:LinkButton ID="lbthuy" Visible="false" runat="server" 
                            onclick="lbthuy_Click" ForeColor="Blue" Font-Bold="True">Huỷ</asp:LinkButton>
				        <asp:TextBox ID="txtimage" Visible="false" runat="server"></asp:TextBox>
                        <asp:LinkButton ID="lbtthaydoi" Visible="false" runat="server" 
                            onclick="lbtthaydoi_Click" Font-Bold="True" ForeColor="Blue">Thay Đổi</asp:LinkButton>
                        <asp:Label ID="Label2" runat="server" Text="<br />Hình ảnh với dung lượng <= 500kb.<br />Các định dạng cho phép: jpg, gif, png."></asp:Label>
				    </div>
			    </div>
                <asp:Panel ID="pn1" runat="server">
                    <div class="blockrow">
					    <div>
					        <asp:Label ID="lblnewssid" runat="server" Text="Mã tin: "></asp:Label>
					        <asp:TextBox ID="txtnewsid" ReadOnly="true" Enabled="false" runat="server"></asp:TextBox>
					    </div>
				    </div>
                </asp:Panel>

				<div class="blockrow">
					<div>
					    <asp:Label ID="lblcategoryid" runat="server" Text="Danh mục: "></asp:Label>
					    <asp:DropDownList ID="dltendanhmuc" DataTextField="Value" DataValueField="Key" runat="server"> </asp:DropDownList>
					</div>
				</div>
                <asp:Panel ID="pn2" runat="server">
                    <div class="blockrow">
					    <div>
					        <asp:Label ID="lblcreateddate" runat="server" Text="Ngày đăng: "></asp:Label> 
					        <asp:Label ID="lbldatecreated" runat="server" Text=""></asp:Label>
					    </div>
				    </div>
                </asp:Panel>
				
				<div class="blockrow">
					<div>
					    <asp:Label ID="lblisactive" runat="server" Text="Kích hoạt: "></asp:Label> 
                        <asp:CheckBox ID="isactive" runat="server" Checked='<%# Bind("IsActive") %>' />
					</div>
				</div>
				<div class="blockrow">
					<div>
					    <asp:Label ID="lblnewscontent" runat="server" Text="Nội dung: "></asp:Label>
					</div>
					<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
                        <script type="text/javascript">

                            window.onload = function () {

                                CKEDITOR.replace('ctl00_ContentPlaceHolder1_txtnewscontent');
                            }
                        </script>
					<div>
                        <asp:TextBox ID="txtnewscontent" runat="server" TextMode="MultiLine" ></asp:TextBox>
					</div>
				</div>

			</div>
		</div>		
    <div class="rightbutton">
	    <span style="float:right; margin-right:-3px;">
            <asp:Button ID="btnupdate" runat="server" Text="Cập nhật" 
                onclick="btnupdate_Click" CausesValidation="true" />
            <asp:Button ID="btntback" runat="server" Text="Trở về" onclick="btnback_Click" />
        </span> 
	</div>
</div>
</asp:Content>